<template>
  <div id="page">
    <div class="wrap">
      <p style="margin-bottom: 18px;margin-top: 18px;">请选择车牌颜色</p>

      <ul class="color-choose">
        <li v-for="(i,index) in colorList" :key="i.name" @click="chooseColor(i,index)"
            :style="{color:currentColor==index?'#FFF':'',background:  currentColor==index?activeBG:'' }"
        >
          {{i.name}}
        </li>

      </ul>

      <p style="margin-bottom: 18px;margin-top: 18px;">
        {{formData.commonCard == "3"?"请输入手机号码":"请输入车牌号码"}}
      </p>


      <div v-if="formData.commonCard == '3'">
        <input type="text" class="iphone-box" v-model="carNum" maxlength="11"
               oninput="value=value.replace(/[^\d]/g,'')">
      </div>

      <div class="num-box" v-else>
        <div class="num0" @click="clickFirstWrap()">
          <span>{{formData.num0}}</span>
        </div>
        <div class="num1" @click="clickKeyWordWrap(1)"><span>{{formData.num1}}</span></div>
        <!--<em class="spot"></em>-->
        <div class="num1" @click="clickKeyWordWrap(2)"><span>{{formData.num2}}</span></div>
        <div class="num1" @click="clickKeyWordWrap(3)"><span>{{formData.num3}}</span></div>
        <div class="num1" @click="clickKeyWordWrap(4)"><span>{{formData.num4}}</span></div>
        <div class="num1" @click="clickKeyWordWrap(5)"><span>{{formData.num5}}</span></div>
        <div class="num1" @click="clickKeyWordWrap(6)"><span>{{formData.num6}}</span></div>
        <div v-if="formData.commonCard == '2'" class="num1" @click="clickKeyWordWrap(7)"><span>{{formData.num7}}</span>
        </div>
      </div>


      <!--<div class="radio-box">-->
      <!--<label class="flex-items-center" @click="keyBoardStatus = true">-->
      <!--<img v-if="formData.commonCard == 1"-->
      <!--src="../assets/images/icon_chose_s@2x.png"-->
      <!--alt="">-->
      <!--<img v-else-->
      <!--src="../assets/images/icon_chose_n@2x.png"-->
      <!--alt="">-->
      <!--<input type="radio"-->
      <!--v-model="formData.commonCard"-->
      <!--value="1"/>普通车牌-->
      <!--</label>-->
      <!--<label class="flex-items-center" @click="keyBoardStatus = true">-->
      <!--<img v-if="formData.commonCard == 2"-->
      <!--src="../assets/images/icon_chose_s@2x.png"-->
      <!--alt="">-->
      <!--<img v-else-->
      <!--src="../assets/images/icon_chose_n@2x.png"-->
      <!--alt="">-->
      <!--<input type="radio"-->
      <!--v-model="formData.commonCard"-->
      <!--value="2"/>新能源车牌-->
      <!--</label>-->
      <!--&lt;!&ndash;<label class="flex-items-center" @click.self="changeTab">&ndash;&gt;-->
      <!--&lt;!&ndash;<img v-if="formData.commonCard == 3"&ndash;&gt;-->
      <!--&lt;!&ndash;src="../assets/images/icon_chose_s@2x.png"&ndash;&gt;-->
      <!--&lt;!&ndash;alt="">&ndash;&gt;-->
      <!--&lt;!&ndash;<img v-else&ndash;&gt;-->
      <!--&lt;!&ndash;src="../assets/images/icon_chose_n@2x.png"&ndash;&gt;-->
      <!--&lt;!&ndash;alt="">&ndash;&gt;-->
      <!--&lt;!&ndash;<input type="radio"&ndash;&gt;-->
      <!--&lt;!&ndash;v-model="formData.commonCard"&ndash;&gt;-->
      <!--&lt;!&ndash;value="3"/>无牌车&ndash;&gt;-->
      <!--&lt;!&ndash;</label>&ndash;&gt;-->
      <!--</div>-->


      <div class="submit-box" @click="submitFn()">
        查询
      </div>

      <x-button type="primary" style="margin-top: 20px;" @click.native="queryApplyInvoice">开票</x-button>

      <div style="margin-top: 30px">
        <p class="tip">温馨提示:</p>
        <p>
          1、只有认证用户才可以购买会员卡。如有需要请致电010-66020580了解详情。
        </p>
      </div>
    </div>
    <div class="first-word-wrap"
         v-if="firstWrapStatus">
      <div class="first-word"
           @click="selectFirstWord($event)">
        <div class="word">
          <span>蒙</span>
        </div>
        <div class="word">
          <span>湘</span>
        </div>
        <div class="word">
          <span>津</span>
        </div>
        <div class="word">
          <span>鄂</span>
        </div>
        <div class="word">
          <span>沪</span>
        </div>
        <div class="word">
          <span>粤</span>
        </div>
        <div class="word">
          <span>渝</span>
        </div>
        <div class="word">
          <span>琼</span>
        </div>
      </div>
      <div class="first-word"
           @click="selectFirstWord($event)">
        <div class="word">
          <span>冀</span>
        </div>
        <div class="word">
          <span>川</span>
        </div>
        <div class="word">
          <span>晋</span>
        </div>
        <div class="word">
          <span>贵</span>
        </div>
        <div class="word">
          <span>辽</span>
        </div>
        <div class="word">
          <span>云</span>
        </div>
        <div class="word">
          <span>吉</span>
        </div>
        <div class="word">
          <span>陕</span>
        </div>
      </div>
      <div class="first-word"
           @click="selectFirstWord($event)">
        <div class="word">
          <span>黑</span>
        </div>
        <div class="word">
          <span>甘</span>
        </div>
        <div class="word">
          <span>苏</span>
        </div>
        <div class="word">
          <span>青</span>
        </div>
        <div class="word">
          <span>浙</span>
        </div>
        <div class="word">
          <span>皖</span>
        </div>
        <div class="word">
          <span>藏</span>
        </div>
        <div class="word">
          <span>闽</span>
        </div>
      </div>
      <div class="first-word"
           @click="selectFirstWord($event)">
        <div class="word">
          <span>京</span>
        </div>
        <div class="word">
          <span>赣</span>
        </div>
        <div class="word">
          <span>桂</span>
        </div>
        <div class="word">
          <span>鲁</span>
        </div>
        <div class="word">
          <span>宁</span>
        </div>
        <div class="word">
          <span>豫</span>
        </div>
        <div class="word">
          <span>新</span>
        </div>
        <div class="word bordernone">
          <!-- <img src="../assets/images/icon-switch.png" alt=""> -->
        </div>
      </div>
    </div>
    <div class="keyboard-wrap" v-show="keyBoardStatus == true">
      <!-- <div class="number-wrap"></div>
      <div class="letter-wrap"></div>
      <div class="cn-wrap"></div> -->
      <div class="keyboard" v-if="activeKeyWordIndex !== 1">
        <span v-for="(item,index) in allKeyWord._1"
              :key="index"
              @click="clickKeyBoard(item)">{{item}}</span>
      </div>
      <div class="keyboard" v-if="activeKeyWordIndex !== 1">
        <span v-for="(item,index) in allKeyWord._2"
              :key="index"
              @click="clickKeyBoard(item)">{{item}}</span>
        <span class="bordernone"></span>
        <span class="bordernone"></span>
        <span class="bordernone"></span>
        <span class="bordernone"></span>
      </div>
      <div class="keyboard">
        <span v-for="(item,index) in allKeyWord._3"
              :key="index"
              @click="clickKeyBoard(item)">{{item}}</span>
      </div>
      <div class="keyboard">
        <span v-for="(item,index) in allKeyWord._4"
              :key="index"
              @click="clickKeyBoard(item)">{{item}}</span>
      </div>
      <div class="keyboard">
        <span v-for="(item,index) in allKeyWord._5"
              :key="index"
              @click="clickKeyBoard(item)">{{item}}</span>
      </div>
      <div class="keyboard">
        <span v-for="(item,index) in allKeyWord._6"
              :key="index"
              @click="clickKeyBoard(item)">{{item}}</span>
        <span class="bordernone"></span>
        <span class="bordernone"></span>
        <span class="bordernone"></span>
        <!-- <span class="bordernone" v-if="activeKeyWordIndex === 1"></span>
        <span class="bordernone" v-if="activeKeyWordIndex === 1"></span> -->
        <!-- <span @click="deleteWord" v-if="activeKeyWordIndex === 1">x</span> -->
      </div>
      <div class="keyboard" v-if="activeKeyWordIndex !== 1">
        <span v-for="(item,index) in allKeyWord._7"
              :key="index"
              @click="clickKeyBoard(item)">{{item}}</span>
        <span class="bordernone"></span>
        <span class="delete" @click="deleteWord"><img src="../assets/images/icon-delete.png" alt=""></span>
      </div>
      <div class="cancel">
        <span @click="keyBoardStatus = false">完成</span>
      </div>
    </div>


  </div>
</template>
<script>
import { noCarQRcodeInOutPark, queryApplyInvoiceList } from "@/api/plateNumber/plateNumber";
export default {
  data() {
    return {
      colorList: [
        {
          name: "蓝牌",
          id: "0"
        },
        {
          name: "黄牌",
          id: "1"
        },
        {
          name: "绿牌",
          id: "4"
        },
        {
          name: "白牌",
          id: "2"
        },
        {
          name: "黑牌",
          id: "3"
        }
      ],
      currentColor: 0,
      currentID:0,
      activeBG: "#0054C0",
      formData: {
        commonCard: "1",
        num0: "京",
        num1: "",
        num2: "",
        num3: "",
        num4: "",
        num5: "",
        num6: "",
        num7: ""
      },
      allKeyWord: {
        _1: [1, 2, 3, 4, 5, 6, 7],
        _2: [8, 9, 0],
        _3: ["A", "B", "C", "D", "E", "F", "G"],
        _4: ["H", "J", "K", "L", "M", "N", "O"],
        _5: ["P", "Q", "R", "S", "T", "U", "V"],
        _6: ["W", "X", "Y", "Z"],
        _7: ["港", "澳", "学", "领", "警"]
      },
      activeKeyWordIndex: 1, // 当前车牌号
      keyBoardStatus: false,
      firstWrapStatus: false, // 选择弹窗
      confirmTitle: "",
      submitConfirm: false,
      submitConfirmFalse: false,
      submitConfirmText: "",
      carNum: "",
      tip: "车牌号"
    };
  },
  mounted() {


    // this.$msgbox({
    //   title: '提示',
    //   message:
    //     '您为认证用户，当前还没有任何会员卡。购买会员卡享受更多停车优惠。' ,
    //   showCancelButton: true,
    //   confirmButtonText:'去购买',
    //   cancelButtonText: '放弃'
    // });
  },
  methods: {
    getUrlParam(name) {
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
      var r = window.location.search.substr(1).match(reg);
      if (r != null) return unescape(r[2]);
      return null;
    },
    chooseColor(i,index) { // 颜色选择
      this.currentID = i.id
      console.log(index)
      this.currentColor = index
      switch (this.currentColor) {
        case 0 :
          this.activeBG = "#0054C0";
          this.formData.commonCard = 1;
          break;
        case 1 :
          this.activeBG = "#FEBE00";
          this.formData.commonCard = 1;
          break;
        case 2 :
          this.activeBG = "#97DEA1";
          this.formData.commonCard = 2;
          break;
        case 3 :
          this.activeBG = "#E4E5E7";
          this.formData.commonCard = 1;
          break;
        case 4 :
          this.activeBG = "#333333";
          this.formData.commonCard = 1;
          break;
      }
    },
    noCarQRcodeInOutPark() {
      // let params = this.$route.query
      let params = {};
      params.payType = 4;//4：微信     1：支付宝    34:农行
      params.terminalSource = "3";//1:任你听 3：微信公共号 4:云平台 7:H5
      params.app_id = 1;
      params.salt = 2;
      params.deviceInfo = 3;
      params.sign_type = "md5";
      params.sign = 4;
      params.token = "666";
      params.carNumber = this.carNum;
      params.carNumberColor = this.currentID; // 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
      noCarQRcodeInOutPark(params).then(res => {
        console.log(res);
        if (res.code == 0) {
          if (res.data.buyState == 20) {
            sessionStorage.setItem("hasBuyCardInfo", JSON.stringify(res.data.hasBuyCardInfo));
            this.$router.push({
              path: "cardList",

            });
          } else {
            sessionStorage.setItem("cardIfo", JSON.stringify(res.data.availableVipCardInfoList));
            this.$router.push({
              path: "buyCardList",
              // query: {
              //   start: this.$utils.formatTime(res.data.availableBuyCardInfo.validStartTime),
              //   end: this.$utils.formatTime(res.data.availableBuyCardInfo.validEndTime)
              // }
            });
          }
        } else {
          this.$toast({
            message: res.message,
            iconClass: "iconfont icon-xiaolianhaoping",
            duration: 3000,
            className: "textStyle",
            position: "top"
          });
        }
      });
    },
    changeTab() {
      // this.firstSelectStatus = false
      // this.firstWrapStatus = false
      this.keyBoardStatus = false;
      this.firstClickStatus = false;
      this.firstWrapStatus = false;
    },
    clickFirstWrap() {
      // 点击第一个输入框
      this.firstClickStatus = true;
      this.firstWrapStatus = true;
      this.keyBoardStatus = false;
      this.formData.num0 = "";
    },
    selectFirstWord(event) {
      // 选择省份
      if (event.target.localName !== "span") {
        return;
      }
      this.formData.num0 = event.target.innerText;
      this.firstSelectStatus = true;
      this.firstWrapStatus = false;
      this.firstClickStatus = false;
      this.keyBoardStatus = true;
      this.activeKeyWordIndex = 1;
      // this.$refs.num1.focus()
      // document.getElementById('num1').focus()
    },
    clickKeyBoard(item) { // 点击自定义键盘
      console.log(item);
      this.formData["num" + this.activeKeyWordIndex] = item;
      if (this.formData.commonCard === "1") {
        this.activeKeyWordIndex++;
        if (this.activeKeyWordIndex > 6) {
          this.keyBoardStatus = false;
        }
      } else {
        this.activeKeyWordIndex++;
        if (this.activeKeyWordIndex > 7) {
          this.keyBoardStatus = false;
        }
      }
    },
    deleteWord() { // 退格
      // console.log(this.activeKeyWordIndex)
      // console.log(this.formData['num' + (this.activeKeyWordIndex - 1)])
      if (this.activeKeyWordIndex > 1) {
        this.formData["num" + (this.activeKeyWordIndex - 1)] = "";
        this.activeKeyWordIndex--;
      }
    },
    clickKeyWordWrap(activeKeyWordIndex) {
      this.keyBoardStatus = true;
      this.activeKeyWordIndex = activeKeyWordIndex;
      this.formData["num" + this.activeKeyWordIndex] = "";
    },
    submitFn() {
      let plateLicense;
      if (this.formData.commonCard === "1") {
        plateLicense = this.plate_license_1;
        plateLicense = this.palindrome(plateLicense);
        if (plateLicense.length < 7) {
          this.$msgbox("提示", "请输入正确车牌号");
          return;
        }
        this.carNum = plateLicense;
      }
      if (this.formData.commonCard === 2) {
        plateLicense = this.plate_license_2;
        plateLicense = this.palindrome(plateLicense);
        if (plateLicense.length < 8) {
          this.$msgbox("提示", "请输入正确车牌号");
          return;
        }
        this.carNum = plateLicense;
      }
      console.log(plateLicense);
      if (this.formData.commonCard === "3") {
        plateLicense = this.plate_license_2;
        plateLicense = this.palindrome(plateLicense);
        if (this.carNum.length < 11) {
          this.$msgbox("提示", "请输入正确手机号");
          return;
        }
        this.carNum = this.carNum + "111";
      }
      //
      // this.$emit('getPlateLicense', plateLicense)
      console.log(plateLicense);
      // this.$router.push({
      //   path: 'pay',
      //   query: {
      //     carNumber: plateLicense
      //   }
      // })
      this.noCarQRcodeInOutPark();
    },
    queryApplyInvoice() {
      let plateLicense;
      if (this.formData.commonCard === "1") {
        plateLicense = this.plate_license_1;
        plateLicense = this.palindrome(plateLicense);
        if (plateLicense.length < 7) {
          this.$msgbox("提示", "请输入正确车牌号");
          return;
        }
        this.carNum = plateLicense;
      }
      if (this.formData.commonCard === 2) {
        plateLicense = this.plate_license_2;
        plateLicense = this.palindrome(plateLicense);
        if (plateLicense.length < 8) {
          this.$msgbox("提示", "请输入正确车牌号");
          return;
        }
        this.carNum = plateLicense;
      }
      console.log(plateLicense);
      if (this.formData.commonCard === "3") {
        plateLicense = this.plate_license_2;
        plateLicense = this.palindrome(plateLicense);
        if (this.carNum.length < 11) {
          this.$msgbox("提示", "请输入正确手机号");
          return;
        }
        this.carNum = this.carNum + "111";
      }
      //
      // this.$emit('getPlateLicense', plateLicense)
      console.log(plateLicense);
      // this.$router.push({
      //   path: 'pay',
      //   query: {
      //     carNumber: plateLicense
      //   }
      // })
      this.queryApplyInvoiceList();
    },
    queryApplyInvoiceList: function() {
      let params = {};
      params.payType = 4;//4：微信     1：支付宝    34:农行
      params.terminalSource = "3";//1:任你听 3：微信公共号 4:云平台 7:H5
      params.app_id = 1;
      params.salt = 2;
      params.deviceInfo = 3;
      params.sign_type = "md5";
      params.sign = 4;
      params.token = "666";
      params.carNumber = this.carNum;
      params.carNumberColor = this.currentID;
      console.log(params)
      queryApplyInvoiceList(params).then(res => {
        console.log(res);
        if(res.code==0){
          if(res.data.length>0){
            sessionStorage.setItem("hasBuyCardInfo", JSON.stringify(res.data));
            this.$router.push({
              path: "cardList",
              query: {
                car: this.carNum,
                color: this.currentID
              }
            });
          }else{
            this.$msgbox('温馨提示', '未查询到您的会员卡记录,无法开票！')
          }
        }else{
          this.$msgbox('温馨提示', res.message)
        }

        // if (res.code == 0) {
        //   if (res.data.buyState == 20) {
        //     sessionStorage.setItem("hasBuyCardInfo", JSON.stringify(res.data.hasBuyCardInfo));
        //     this.$router.push({
        //       path: "cardList"
        //     });
        //   } else {
        //     sessionStorage.setItem("cardIfo", JSON.stringify(res.data.availableBuyCardInfo));
        //     this.$router.push({
        //       path: "buyCard",
        //       query: {
        //         start: this.$utils.formatTime(res.data.availableBuyCardInfo.validStartTime),
        //         end: this.$utils.formatTime(res.data.availableBuyCardInfo.validEndTime)
        //       }
        //     });
        //   }
        // } else {
        //   this.$toast({
        //     message: res.message,
        //     iconClass: "iconfont icon-xiaolianhaoping",
        //     duration: 3000,
        //     className: "textStyle",
        //     position: "top"
        //   });
        // }
      });
    },
    palindrome(str) {
      var arr = str.split("");
      arr = arr.filter(function(val) {
        return (
          val !== " " &&
          val !== "," &&
          val !== "." &&
          val !== "?" &&
          val !== ":" &&
          val !== ";" &&
          val !== "`" &&
          val !== "'" &&
          val !== "_" &&
          val !== "/" &&
          val !== "-" &&
          val !== "\\" &&
          val !== "" &&
          val !== "(" &&
          val !== ")"
        );
      });
      return arr.join("");
    },
    checkIsHasSpecialStr(str) {
      var flag = false;
      var arr = str.split("");
      arr.forEach(val => {
        if (
          val === "!" ||
          val === "}" ||
          val === "{" ||
          val === "]" ||
          val === "[" ||
          val === "&" ||
          val === "$" ||
          val === "@" ||
          val === " " ||
          val === "," ||
          val === "." ||
          val === "?" ||
          val === ":" ||
          val === ";" ||
          val === "`" ||
          val === "'" ||
          val === "_" ||
          val === "/" ||
          val === "-" ||
          val === "\\" ||
          val === "" ||
          val === "(" ||
          val === ")"
        ) {
          flag = true;
        }
      });
      return flag;
    },
    checkIsHasChineseStr(str) {
      var Reg = /.*[\u4e00-\u9fa5]+.*/;
      if (Reg.test(str)) {
        return true;
      }
      return false;
    }
  },
  computed: {
    plate_license_1() {
      return (
        this.formData.num0 +
        this.formData.num1 +
        this.formData.num2 +
        this.formData.num3 +
        this.formData.num4 +
        this.formData.num5 +
        this.formData.num6
      );
    },
    plate_license_2() {
      return (
        this.formData.num0 +
        this.formData.num1 +
        this.formData.num2 +
        this.formData.num3 +
        this.formData.num4 +
        this.formData.num5 +
        this.formData.num6 +
        this.formData.num7
      );
    }
  }
};
</script>
<style lang="scss" scoped>
  .flex-items-center {
    display: flex;
    align-items: center;
  }

  .wrap {
    padding: 0 18px;
    .radio-box {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-top: 18px;
      text-align: right;
      input[type="radio"] {
        display: none;
      }
      label {
        padding-left: 0.6rem;
        cursor: pointer;
        img {
          width: 0.8rem;
          margin-right: 0.1rem;
        }
      }
    }

    .color-choose {
      width: 265px;
      height: 34px;
      margin: 0 auto;
      background: #F3F3F3;
      border-radius: 6px;
      display: flex;
      li {
        flex: 1;
        text-align: center;
        line-height: 34px;
        border-radius: 6px;
      }
    }
    .card-header {
      font-size: 0.75rem;
      margin: 0.2rem 0 0.5rem;
      color: #4a4a4a;
    }
    // input输入框
    .num-box {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .spot {
        width: 0.2rem;
        height: 0.2rem;
        border-radius: 50%;
        background-color: #d8d8d8;
      }
      & > div {
        width: 1.8rem;
        height: 1.8rem;
        border: 1px solid #e4e4e4;
        &.first {
          position: relative;
          text-align: center;
          line-height: 1.7rem;
          font-weight: 200;
          .input-wrap {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            &.active {
              z-index: 100;
            }
          }
          em {
            color: #979797;
            font-size: 1.6rem;
            line-height: 1.7rem;
          }
          span {
            display: inline-block;
            width: 100%;
            height: 100%;
            // background-color: #9cbce2;
            color: #828282;
            line-height: 1.8rem;
          }
        }
        &.active {
          border: 1px solid #4a90e2;
          &:after {
            border-bottom: 0.5rem solid #4a90e2;
          }
        }
        span {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          height: 100%;
          font-size: 1rem;
          color: #828282;
          &.first {
            background-color: #9cbce2;
            color: #fff;
            text-indent: 0.4rem;
            border-radius: 0;
          }
        }
      }
    }
    .submit-box {
      width: 100%;
      height: 44px;
      line-height: 44px;
      border-radius: 4px;
      font-size: 20px;
      margin-top: 18px;
      background: linear-gradient(180deg, #3885D9 0%, #4194EF 100%);
      color: #fff;
      text-align: center;
    }
    .info {
      font-size: 0.5rem;
      margin-top: 0.9rem;
      color: #828282;
      text-align: left;
      img {
        width: 0.6rem;
        vertical-align: middle;
      }
    }
  }

  .first-word-wrap {
    // height: 9.4rem;
    background-color: #D2D5DB;
    padding: 0.6rem 0.8rem 1.1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    .first-word {
      display: flex;
      justify-content: space-between;
      margin-bottom: 0.45rem;
      .word {
        box-sizing: border-box;
        width: 1.8rem;
        height: 1.8rem;
        // border: 1px solid #9cbce2;
        box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35);
        border-radius: 0.16rem;
        text-align: center;
        &.bordernone {
          border: none;
          box-shadow: none
        }
        span {
          box-sizing: border-box;
          display: flex;
          align-items: center;
          justify-content: center;
          text-align: center;
          width: 100%;
          height: 100%;
          background-color: #fff;
          color: #000;
          // border: 1px solid #fff;
          border-radius: 0.125rem;
        }
        img {
          width: 1.6rem;
        }
      }
      &:nth-last-of-type(1) {
        margin-bottom: 0rem;
      }
    }
  }

  .keyboard-wrap {
    background-color: #D2D5DB;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 0.6rem 0.4rem;
    .keyboard {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 2rem;
      margin-bottom: 0.3rem;
      span {
        text-align: center;
        display: flex;
        width: 1.8rem;
        align-items: center;
        justify-content: center;
        height: 1.8rem;
        margin: 0 0.3rem;
        box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35);
        background-color: #fff;
        border-radius: 0.125rem;
        &:active {
          background-color: #e4e4e4;
        }
        &.bordernone {
          border: none;
          box-shadow: none;
          background-color: #D2D5DB;
          &:active {
            background-color: #D2D5DB;
          }
        }
        &.delete {
          background-color: #465266;
          img {
            width: 1.15rem;
          }
        }
      }
    }
    .cancel {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 3.6rem;
        height: 1.8rem;
        background-color: #465266;
        color: #fff;
        border-radius: 0.125rem;
      }
    }
  }

  input[type="text"]:focus {
    border: 0;
    border: 1px solid #e4e4e4 !important;
  }

  .iphone-box {
    border: 0;
    width: 100%;
    height: 1.8rem;
    line-height: 1.8rem;
    padding-left: 20px;
    border: 1px solid #e4e4e4;
    font-size: 14px;
  }

  .tip {

    padding-left: 20px;
    background: url("../assets/images/tip.png") no-repeat 0 center;
    background-size: 16px 16px;
  }


</style>
